-
-
Notifications
You must be signed in to change notification settings - Fork 398
Show LaTeX math expressions in haddockToMarkdown #4658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
73c076b
to
b6bc7b8
Compare
- Replace fallback messages with raw LaTeX math expressions using $...$ and $$...$$. - This lets editors display the original math content even if they don't render LaTeX. - No sanitization is performed, raw LaTeX is output as-is.
b6bc7b8
to
74a72ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Should we be putting these inside a code formatting? They are, if anything, code, and I think it will read less weirdly if it's formatted that way? or are we hoping that some markdown renderers might actually try to render the latex? |
@michaelpj Makes sense. I can update the patch to use code formatting instead if that’s preferred. Edit: The idea behind using a latex tag or math-style blocks is to make it clearer that it’s LaTeX content. I know fenced blocks are unconventional for inline content, but I wanted to ask before finalizing. Either way, this change is something I will really appreciate since it means I won’t have to open the documentation in a browser to see important details such as time complexity, all the important information will be in my text editor. |
I think it probably makes sense to use inline-code-formatting (single backticks) for inline math, and a fenced code block (triple backticks) for display math? so that would mean we could only include the language tag for display math, but that's a downside that all users of markdown face I guess. |
I updated the patch to use single backticks for inline math and fenced code blocks with the latex tag for display math, as discussed. |
$...$
and$$...$$
.